<?php

$getPetInfo = fetch("SELECT * FROM user_pets2 WHERE owner = '$userid' AND id = '$use_on' AND game = '$game'");

if (!$getPetInfo[id])
{
		die("
		<br><center>
		<table width=380 cellspacing=0>
		<tr>
		<td bgcolor=$topAndBottomBG>
		<center><b><font color=$topAndBottomText>Selected Item</font></b></center>
		</td>
		<td width=300 bgcolor=$topAndBottomBG>
		<center><b><font color=$topAndBottomText>Item Details</font></b></center>
		</td>
		</tr>
		<tr height=100>
		<td valign=middle>
		<p align=center><img src=images/user_images/opg_$game/items/item_$find_item2[id].gif>
		<br>
		<b>$find_item2[item_name]</b>
		</td>
		<td width=300>
		<p 	align=center>That is not your pet.<br>($find_item[parts_left]/$find_item2[parts] Parts Left)<br><a href=myitems.php?game=$game>Back to Items</a></p>
		</td>
		</tr>
		</table>
		</center>
		");
}

mysql_query("UPDATE user_pets2 SET wearing = '$find_item2[id]' WHERE owner = '$userid' AND id = '$use_on' AND game = '$game'");

mysql_query("DELETE FROM usersitems2 WHERE id = '$id' AND owner = '$userid'");

print "
		<br><center>
		<table width=380 cellspacing=0>
		<tr>
		<td bgcolor=$topAndBottomBG>
		<center><b><font color=$topAndBottomText>Selected Item</font></b></center>
		</td>
		<td width=300 bgcolor=$topAndBottomBG>
		<center><b><font color=$topAndBottomText>Item Details</font></b></center>
		</td>
		</tr>
		<tr height=100>
		<td valign=middle>
		<p align=center><img src=images/user_images/opg_$game/items/item_$find_item2[id].gif>
		<br>
		<b>$find_item2[item_name]</b>
		</td>
		<td width=300>
		<p 	align=center>Your pet is now wearing the $find_item2[item_name]!<br><a href=myitems.php?game=$game>Back to Items</a></p>
		</td>
		</tr>
		</table>
		</center>
";

?>